#!/bin/bash

# Tested for Arch, not sure if it will work on other distros
pyver=`python -c 'import sys; print(str(sys.version_info[:2]) in ("(2, 6)", "(2, 7)"))'`
py2ver=`python2 -c 'import sys; print(str(sys.version_info[:2]) in ("(2, 6)", "(2, 7)"))'`

if [ "$pyver" = "False" ]; then
    if [ "$py2ver" = "False" ]; then
        echo "Cannot find Python 2.6 or 2.7; quitting."
    else
        python2 pyiiasmh_cli.py $*
    fi
else
    python pyiiasmh_cli.py $*
fi
